<?php

namespace App\Http\Resources\Train;

use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use JsonSerializable;

class StationResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param Request $request
     *
     * @return array|Arrayable|JsonSerializable
     */
    public function toArray($request)
    {
        return [
            'station_name'    => $this->station_name,
            'station_name_uy' => $this->station_name_uy,
            'station_code'    => $this->station_code,
            'type'            => 2,
            'code'            => $this->station_code,
            'name'            => $this->station_name,
            'name_uy'         => $this->station_name_uy,
        ];
    }
}
